package 第三章作业.第二次;

import java.util.Scanner;

public class Test5 {
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        System.out.println("请输入本次网购金额：");
        double price = reader.nextDouble();
        System.out.println("请输入和发货点之间的距离（公里数）：");
        int n = reader.nextInt();
        if(n > 0 && n <= 10){
            System.out.printf("运费为%d,总金额为%.2f",10,price+10);
        }
        else if(n > 10 && n <=50){
            System.out.printf("运费为%d,总金额为%.2f",50,price+50);
        }
        else if(n > 50 && n <=100){
            System.out.printf("运费为%d,总金额为%.2f",100,price+100);
        }
        else if(n > 100){
            System.out.printf("运费为%d,总金额为%.2f",200,price+200);
        }
    }
}
